package com.quiz.bis.domain.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.quiz.bis.domain.vo.QuestionDetailVo;
import com.quiz.common.core.domain.BaseModel;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.Date;

/**
 * 错题记录实体类
 *
 * @author ahuan
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("wrong_question_records")
public class WrongQuestionRecord extends BaseModel {
    @TableId(type = IdType.AUTO)
    private Long id;

    private Long bookId;
    private Long questionId;
    private Long questionAnswerId;
    private Long examId;
    private String examName;
    private Integer wrongCount;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date lastWrongTime;
    private Integer masterLevel;
    private Integer isMastered;
    private String tagsJson;

    @TableField(exist = false)
    private QuestionDetailVo question;
    @TableField(exist = false)
    private ExamQuestionAnswers answer;
    @TableField(exist = false)
    private Exam exam;
}